package com.ecoolex.ying.space.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import org.springframework.lang.NonNull;

/**
 *
 *   外购套餐\r\n<br>
 *<br>
 * 数据表： outsourcing_packaged
 *
 */
@Description({"外购套餐\r\n"})
public class OutsourcingPackaged implements Serializable {
    /**
     *
     *   外购商品套餐Id    <br>
     *<br>
     * 字段名： outsourcing_packaged.OutsourcingPackagedId
     */
    @Description({"外购商品套餐Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer outsourcingPackagedId;

    /**
     *
     *   商品名称    <br>
     *<br>
     * 字段名： outsourcing_packaged.Name
     */
    @Description({"商品名称", "不能为空", "数据长度: 400"})
    @NonNull
    private String name;

    /**
     *
     *   副商品名称    <br>
     *<br>
     * 字段名： outsourcing_packaged.SubName
     */
    @Description({"副商品名称", "数据长度: 255"})
    private String subName;

    /**
     *
     *   专柜价格    <br>
     *<br>
     * 字段名： outsourcing_packaged.CounterPrice
     */
    @Description({"专柜价格", "数据长度: 18"})
    private BigDecimal counterPrice;

    /**
     *
     *   零售价格    <br>
     *<br>
     * 字段名： outsourcing_packaged.RetailPrice
     */
    @Description({"零售价格", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal retailPrice;

    /**
     *
     *   购买链接    <br>
     *<br>
     * 字段名： outsourcing_packaged.BuyLink
     */
    @Description({"购买链接", "不能为空", "数据长度: 1000"})
    @NonNull
    private String buyLink;

    /**
     *
     *   封面图    <br>
     *<br>
     * 字段名： outsourcing_packaged.CoverImage
     */
    @Description({"封面图", "不能为空", "数据长度: 255"})
    @NonNull
    private String coverImage;

    /**
     *
     *   列表图集合    <br>
     *<br>
     * 字段名： outsourcing_packaged.Images
     */
    @Description({"列表图集合", "不能为空", "数据长度: 2000"})
    @NonNull
    private String images;

    /**
     *
     *   运费描述    <br>
     *<br>
     * 字段名： outsourcing_packaged.FreightDescribe
     */
    @Description({"运费描述", "数据长度: 1000"})
    private String freightDescribe;

    /**
     *
     *   服务描述    <br>
     *<br>
     * 字段名： outsourcing_packaged.ServiceDescribe
     */
    @Description({"服务描述", "数据长度: 1000"})
    private String serviceDescribe;

    /**
     *
     *   上线    <br>
     *<br>
     * 字段名： outsourcing_packaged.Online
     */
    @Description({"上线", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean online;

    public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();

    public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();

    /**
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： outsourcing_packaged.Deleted
     */
    @Description({"逻辑删除", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean deleted;

    /**
     *
     *   创建用户    <br>
     *<br>
     * 字段名： outsourcing_packaged.CreateUser
     */
    @Description({"创建用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String createUser;

    /**
     *
     *   创建时间    <br>
     *<br>
     * 字段名： outsourcing_packaged.CreateTime
     */
    @Description({"创建时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date createTime;

    /**
     *
     *   修改用户    <br>
     *<br>
     * 字段名： outsourcing_packaged.UpdateUser
     */
    @Description({"修改用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String updateUser;

    /**
     *
     *   修改时间    <br>
     *<br>
     * 字段名： outsourcing_packaged.UpdateTime
     */
    @Description({"修改时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date updateTime;

    /**
     *
     *   套餐详情    <br>
     *<br>
     * 字段名： outsourcing_packaged.Detail
     */
    @Description({"套餐详情", "数据长度: 65535"})
    private String detail;

    private static final long serialVersionUID = 1L;

    /**
     * 获取参数<br><br>
     *
     *   外购商品套餐Id    <br>
     *<br>
     * 字段名： outsourcing_packaged.OutsourcingPackagedId
     */
    public Integer getOutsourcingPackagedId() {
        return outsourcingPackagedId;
    }

    /**
     * 设置参数<br><br>
     *
     *   外购商品套餐Id<br>
     *<br>
     * 字段名： outsourcing_packaged.OutsourcingPackagedId
     */
    public void setOutsourcingPackagedId(Integer outsourcingPackagedId) {
        this.outsourcingPackagedId = outsourcingPackagedId;
    }

    /**
     * 获取参数<br><br>
     *
     *   商品名称    <br>
     *<br>
     * 字段名： outsourcing_packaged.Name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品名称<br>
     *<br>
     * 字段名： outsourcing_packaged.Name
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   副商品名称    <br>
     *<br>
     * 字段名： outsourcing_packaged.SubName
     */
    public String getSubName() {
        return subName;
    }

    /**
     * 设置参数<br><br>
     *
     *   副商品名称<br>
     *<br>
     * 字段名： outsourcing_packaged.SubName
     */
    public void setSubName(String subName) {
        this.subName = subName == null ? null : subName.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   专柜价格    <br>
     *<br>
     * 字段名： outsourcing_packaged.CounterPrice
     */
    public BigDecimal getCounterPrice() {
        return counterPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   专柜价格<br>
     *<br>
     * 字段名： outsourcing_packaged.CounterPrice
     */
    public void setCounterPrice(BigDecimal counterPrice) {
        this.counterPrice = counterPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   零售价格    <br>
     *<br>
     * 字段名： outsourcing_packaged.RetailPrice
     */
    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   零售价格<br>
     *<br>
     * 字段名： outsourcing_packaged.RetailPrice
     */
    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   购买链接    <br>
     *<br>
     * 字段名： outsourcing_packaged.BuyLink
     */
    public String getBuyLink() {
        return buyLink;
    }

    /**
     * 设置参数<br><br>
     *
     *   购买链接<br>
     *<br>
     * 字段名： outsourcing_packaged.BuyLink
     */
    public void setBuyLink(String buyLink) {
        this.buyLink = buyLink == null ? null : buyLink.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   封面图    <br>
     *<br>
     * 字段名： outsourcing_packaged.CoverImage
     */
    public String getCoverImage() {
        return coverImage;
    }

    /**
     * 设置参数<br><br>
     *
     *   封面图<br>
     *<br>
     * 字段名： outsourcing_packaged.CoverImage
     */
    public void setCoverImage(String coverImage) {
        this.coverImage = coverImage == null ? null : coverImage.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   列表图集合    <br>
     *<br>
     * 字段名： outsourcing_packaged.Images
     */
    public String getImages() {
        return images;
    }

    /**
     * 设置参数<br><br>
     *
     *   列表图集合<br>
     *<br>
     * 字段名： outsourcing_packaged.Images
     */
    public void setImages(String images) {
        this.images = images == null ? null : images.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   运费描述    <br>
     *<br>
     * 字段名： outsourcing_packaged.FreightDescribe
     */
    public String getFreightDescribe() {
        return freightDescribe;
    }

    /**
     * 设置参数<br><br>
     *
     *   运费描述<br>
     *<br>
     * 字段名： outsourcing_packaged.FreightDescribe
     */
    public void setFreightDescribe(String freightDescribe) {
        this.freightDescribe = freightDescribe == null ? null : freightDescribe.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   服务描述    <br>
     *<br>
     * 字段名： outsourcing_packaged.ServiceDescribe
     */
    public String getServiceDescribe() {
        return serviceDescribe;
    }

    /**
     * 设置参数<br><br>
     *
     *   服务描述<br>
     *<br>
     * 字段名： outsourcing_packaged.ServiceDescribe
     */
    public void setServiceDescribe(String serviceDescribe) {
        this.serviceDescribe = serviceDescribe == null ? null : serviceDescribe.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   上线    <br>
     *<br>
     * 字段名： outsourcing_packaged.Online
     */
    public Boolean getOnline() {
        return online;
    }

    /**
     * 设置参数<br><br>
     *
     *   上线<br>
     *<br>
     * 字段名： outsourcing_packaged.Online
     */
    public void setOnline(Boolean online) {
        this.online = online;
    }

    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * 获取参数<br><br>
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： outsourcing_packaged.Deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置参数<br><br>
     *
     *   逻辑删除<br>
     *<br>
     * 字段名： outsourcing_packaged.Deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 获取参数<br><br>
     *
     *   创建用户    <br>
     *<br>
     * 字段名： outsourcing_packaged.CreateUser
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建用户<br>
     *<br>
     * 字段名： outsourcing_packaged.CreateUser
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   创建时间    <br>
     *<br>
     * 字段名： outsourcing_packaged.CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建时间<br>
     *<br>
     * 字段名： outsourcing_packaged.CreateTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   修改用户    <br>
     *<br>
     * 字段名： outsourcing_packaged.UpdateUser
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改用户<br>
     *<br>
     * 字段名： outsourcing_packaged.UpdateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   修改时间    <br>
     *<br>
     * 字段名： outsourcing_packaged.UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改时间<br>
     *<br>
     * 字段名： outsourcing_packaged.UpdateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   套餐详情    <br>
     *<br>
     * 字段名： outsourcing_packaged.Detail
     */
    public String getDetail() {
        return detail;
    }

    /**
     * 设置参数<br><br>
     *
     *   套餐详情<br>
     *<br>
     * 字段名： outsourcing_packaged.Detail
     */
    public void setDetail(String detail) {
        this.detail = detail == null ? null : detail.trim();
    }

    public enum Deleted {
        NOT_DELETED(new Boolean("false"), "未删除"),
        IS_DELETED(new Boolean("true"), "已删除");

        private final Boolean value;

        private final String name;

        Deleted(Boolean value, String name) {
            this.value = value;
            this.name = name;
        }

        public Boolean getValue() {
            return this.value;
        }

        public Boolean value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Column {
        outsourcingPackagedId("OutsourcingPackagedId", "outsourcingPackagedId", "INTEGER", false),
        name("Name", "name", "VARCHAR", true),
        subName("SubName", "subName", "VARCHAR", false),
        counterPrice("CounterPrice", "counterPrice", "DECIMAL", false),
        retailPrice("RetailPrice", "retailPrice", "DECIMAL", false),
        buyLink("BuyLink", "buyLink", "VARCHAR", false),
        coverImage("CoverImage", "coverImage", "VARCHAR", false),
        images("Images", "images", "VARCHAR", false),
        freightDescribe("FreightDescribe", "freightDescribe", "VARCHAR", false),
        serviceDescribe("ServiceDescribe", "serviceDescribe", "VARCHAR", false),
        online("Online", "online", "BIT", true),
        deleted("Deleted", "deleted", "BIT", false),
        createUser("CreateUser", "createUser", "VARCHAR", true),
        createTime("CreateTime", "createTime", "TIMESTAMP", false),
        updateUser("UpdateUser", "updateUser", "VARCHAR", false),
        updateTime("UpdateTime", "updateTime", "TIMESTAMP", false),
        detail("Detail", "detail", "LONGVARCHAR", false);

        private static final String BEGINNING_DELIMITER = "`";

        private static final String ENDING_DELIMITER = "`";

        private final String column;

        private final boolean isColumnNameDelimited;

        private final String javaProperty;

        private final String jdbcType;

        public String value() {
            return this.column;
        }

        public String getValue() {
            return this.column;
        }

        public String getJavaProperty() {
            return this.javaProperty;
        }

        public String getJdbcType() {
            return this.jdbcType;
        }

        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}